package org.zn.etl.datasource;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import javax.sql.DataSource;

public abstract class DataSourceFactory {
	
	 protected Map<String, DataSource> context=new ConcurrentHashMap<>();
	
	 public abstract DataSource getDataSource(String  keyName,Map<String, String> dataSourceConfig) throws Exception;
	 
	 public DataSource getDataSource(String  keyName) {
			return   context.get(keyName);
	}

	 
}
